using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class SkinnProCustomWindow : EditorWindow
{
    public static SkinnProCustomWindow Instance;

    [MenuItem("PresenceTools/CC3/1.SkinnPro自定义编辑器", priority = 1)]
    private static SkinnProCustomWindow OpenWindow()
    {
        Instance = GetWindow<SkinnProCustomWindow>("SkinnPro自定义编辑器");
        Instance.Show();

        return Instance;
    }

    private SkinnProCustomInspector inspector;
    public SkinnProCustomInspector GetInspector()
    {
        if (inspector == null)
        {
            inspector = new SkinnProCustomInspector();
        }

        return inspector;
    }

    public static void CloseWindow()
    {
        Instance.Close();
        Instance = null;
    }

    private void OnGUI()
    {
        if (inspector == null)
        {
            inspector = new SkinnProCustomInspector();
        }

        inspector.DrawInspector();
    }
}
